const mongoose=require('mongoose');

function dbConnect() {
    mongoose.connect('mongodb://127.0.0.1/shoponline');
    mongoose.connection.once('open',function(err){
        if (!err){
            console.log('mongodb is oppening success!!');
        }else{
            console.log('mongodb is oppening failure!!');
        }
    })
}

exports.dbConnect=dbConnect;